Skip to content

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Sep 24, 2024

Removes the branch from advance_backoff_counter so that it is just an increment, as the name suggests.

backoff_counter_triggers(_Py_BackoffCounter counter)
{
return counter.value == 0;
/* Test whether the value is zero and the backoff is not UNREACHABLE_BACKOFF */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not testing that the value is zero. Is this comment accurate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is testing whether the value is zero. The value is the high bits, so value == 0 for any value_and_backoff < (1 << BACKOFF_BITS)

@markshannon markshannon merged commit f55273b into python:main Oct 7, 2024
55 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants